<div class="form">
        <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate
              name="addValidateForm_1">
            <div class="form-body" >
                <div>
                    <div class="row" ng-if="!updateHrefFlag">
                        <label class="col-md-2 control-label" style="width: 94px;"><span class="required">*</span>上刊类型</label>

                        <div class="col-md-2" >
                            <select  class="form-control" name="billType" ng-model="publishBill.billType" style="width: 145px;"
                                    ng-options="opt.value as opt.name for opt in options.publishBillType" ng-change="addPublish.changeBillType();" required>
                             <option value="">-- 上刊类型 --</option>
                             </select>
                        </div>
                        
                         <label class="col-md-2 control-label" style="width: 94px;"><span class="required">*</span>媒体类型</label>

                         <div class="col-md-2">
                             <select  class="form-control" name="mediaType" ng-model="publishBill.mediaType" style="width: 145px;"
                                      ng-options="opt.value as opt.name for opt in mediaTypes" ng-change="addPublish.changeMediaType();"  required>
                                      <option value="">-- 媒体形式 --</option>
                             </select>
                         </div>
                        <div class="col-md-4" style="margin-top: -5px;text-align: right;">
							<a class="btn btn-success title-action"  href="#/publish/addPublish.html" ng-click="addPublish.addPublishDetail();"
								style="width: 131px;height: 46px;margin-top: -7px;background-color:#3E97E4;font-size:17px;" 
									tabindex="0">
						               <i class="fa fa-plus"></i> 添加明细
				            </a>
						</div>
						<div class="col-md-1" style="text-align: right;margin-top: -2%;margin-left:8%">
							<div class="btn-group btn-theme-panel" style="margin-left: 10%;">
								<a href="javascript:;" class="btn dropdown-toggle"  ng-click="addPublish.callBack();">
								<i class="icon-arrow-left" style="font-size: 45px;"></i>
								</a>
							</div>
						</div>
                    </div>
                    <div class="row" ng-if="updateHrefFlag">
	                     <div class="col-md-3">
	                     	<span style="margin-left: 15%;font-size: 17px;color: #656060;">上刊类型 ： </span>
	                     	<span style="font-size: 17px;color: #656060;">{{publishBill.billType | code : 'publishBillType'}}</span>
						</div>
                        <div class="col-md-3">
                          <span style="margin-left: 10%;font-size: 17px;color: #656060;">媒体类型 ： </span>
                   		  <span style="font-size: 17px;color: #656060;">{{mediaName}}</span>
						</div>
                         <div class="col-md-2">
						</div>
                        <div class="col-md-2" style="margin-top: -5px;text-align: center;">
							<a class="btn btn-success title-action"  href="#/publish/addPublish.html" ng-click="addPublish.addPublishDetail();"
								style="width: 131px;height: 46px;margin-top: -7px;background-color:#B55A5A;font-size:17px;"
									tabindex="0">
						               <i class="fa fa-plus"></i> 添加明细
				            </a>
						</div>
						 <div class="col-md-1" style="text-align: right;margin-top: -2%;">
							<div class="btn-group btn-theme-panel" style="margin-left: 135%;">
								<a href="javascript:;" class="btn dropdown-toggle"  ng-click="addPublish.callBack();">
								<i class="icon-arrow-left" style="font-size: 45px;"></i>
								</a>
							</div>
						</div>
                    </div>
                </div>
                     <hr/>
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label"><span class="required">*</span>上刊内容</label>
		                         <div class="col-md-6">
		                            <input type="text" class="form-control" name="contractNo"
		                                   ng-model="publishBill.content" required>
		                        </div>
		                    </div>
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label"><span class="required">*</span>开始时间</label>
		                        <div class="col-md-6">
		                            <input type="text" class="form-control" name="publishTime" ed-date-picker
                                   ng-model="publishBill.publishTime" required>
		                        </div>
		                    </div>
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label"><span class="required">*</span>截止时间</label>
		                        <div class="col-md-6">
		                            <input type="text" class="form-control" name="publishOffTime" ed-date-picker
                                   ng-model="publishBill.publishOffTime" required>
		                        </div>
		              		</div>
		              		<div class="form-group">
		                    	<label class="col-md-2 control-label"><span class="required">*</span>广告资料</label>
		                         <div class="col-md-2">
                       				<div ed-uploader data-options="text:' 资料上传',multiple: true" class="ng-uploader" ng-model="bidFile.file" ></div>
               					 </div>
               					 <div>
	               					 <table style="width: 180px;margin-left: -7px;" >
		               					 <tr   ng-repeat="file in bidFile.file">
			               					 <td>
			               					 	<span  style="margin:0px 0px 0px 5px;" >{{file.name}}</span>
			               					 </td>
			               					 <td>
			               					 	<a href="javascript:void(0);" ng-click="fileModal.deleteFile(file,1);" style="font-size:17px;" title="删除" class="fa fa-close" ></a>
			               					 </td>
		               					 </tr>
	               					 </table>
               					 </div>
		                    </div>
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label"><span class="required">*</span>广告样刊</label>
		                        <div class="col-md-6">
                       				<div ed-uploader  data-options="text:' 样刊上传',multiple: true" class="ng-uploader" ng-model="bidImg.file" ></div>
                  					</div>
		                    </div>
                 
                						 <!--  加了下面的代码，图片才能有左右滑动效果
           						<div class="mix-grid" ng-show="false">
				                    <div class="col-md-3 col-sm-4 mix ">
				                    	<div class="mix-inner">
												<img class="img-responsive"  ng-src="{{nginxPath+bidImg.file[0].path}}" alt="">
											<div class="mix-details" style="height:50%">
													<span>{{bidImg.file[0].name}}</span>
														<a class="mix-link">
															<i class="fa fa-link"></i>
														</a>
													<a class="mix-preview fancybox-button" ng-href="{{nginxPath+bidImg.file[0].path}}" title="{{bidImg.file[0].name}}" data-rel="fancybox-button">
														<i class="fa fa-search"></i>
													</a>
											</div>
										</div>
									</div>
								</div> -->		
						    <div class="col-md-9" style="margin-left:15%;">	
							 	<div class="mix-grid" ng-repeat="img in bidImg.file">
				                    <div class="col-md-4 col-sm-4 mix " style="display: block;opacity: 1;">
				                    	<div class="mix-inner">
											<img class="img-responsive" ng-src="{{nginxPath+img.path}}" alt="" style="width:250px;height:140px">
											<div class="mix-details" style="height:50%">
													<span>{{img.name}}</span>
														<a class="mix-link" ng-click="fileModal.deleteFile(img,2);">
															<i class="fa fa-close" ></i>
														</a>
													<a class="mix-preview fancybox-button" ng-href="{{nginxPath+img.path}}" title="{{img.name}}" data-rel="fancybox-button">
														<i class="fa fa-search"></i>
													</a>
												</div>
											</div>
										</div>
									</div> 
								</div>
	                    	 <hr/>
	                     </form>
                     </div>
			             <div class="col-md-12" ng-if="busResources.elements.length == 0 && stopResources.elements.length == 0">
							<div style="font-size:30px;height: 220px;color:#E8E0E0;border: 3px dotted #E8E0E0;"><div style="text-align:center; width:200px;margin:35px auto;">暂无资源</div>
							</div>
						</div> 
                     <div class="col-md-12" ng-show="publishBill.billType == '1'">
                        <div class="portlet-body" ng-show="busResources.elements.length > 0">
                            <table class="table table-striped table-bordered table-hover dataTable" style="border-top:0px;">
                                <thead>
                                    <tr>
                                        <th style="text-align: center">资源编号</th>
                                        <th style="text-align: center">车牌</th>
                                        <th style="text-align: center">自编号</th>
                                        <th style="text-align: center">线路</th>
                                        <th style="text-align: center">所属公司</th>
                                        <th style="width: 34px;text-align: center">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ng-repeat="resource in busResources.elements">
                                    	<td style="text-align: center;line-height: 33px;">
                                            {{resource.value.resourceCode}}
                                        </td>
                                     	<td style="text-align: center;line-height: 33px;">
                                            {{resource.value.plateNo}}
                                        </td>
                                        <td style="text-align: center;line-height: 33px;">
                                            <a ng-if="updateHrefFlag" href="javascript:void(0)" ng-click="billDetailsModal.showUpdateModal(resource.value)">{{resource.value.vehicleNo}}</a>
                                            <span ng-if="addFlag && !updateHrefFlag">{{resource.value.vehicleNo}}</span>
                                        </td>
                                        <td style="text-align: center;line-height: 33px;">
                                            {{resource.value.lineNo}}
                                        </td>
                                        <td style="text-align: center;line-height: 33px;">
                                            {{resource.value.companyName}}
                                        </td>
                                        <td style="text-align: center;line-height: 33px;">
                                            <button type="button" class="btn btn-xs btn btn-danger" ng-click="removeResources(resource.value)">
                                                <i class="fa fa-trash-o"></i> 删除
                                            </button>
                                        </td>
                                    </tr>
                                </table>
                            </table>
                        </div>
                    </div> 
                    <div ng-show="publishBill.billType == '2'">
                            <div class="portlet-body"  ng-show="stopResources.elements.length > 0">
                                <table class="table table-striped table-bordered table-hover dataTable" style="border-top:0px;">
                                    <thead>
                                        <tr>
                                         	<th style="text-align: center">资源编号</th>
                                            <th style="text-align: center">站点名称</th>
                                            <th style="text-align: center">所在街道</th>
                                            <th style="text-align: center">行向</th>
                                            <th style="width: 34px;text-align: center">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-repeat="resource in stopResources.elements">
                                         	<td style="text-align: center;line-height: 33px;">
                                                {{resource.value.resourceCode}}
                                            </td>
                                            <td style="text-align: center;line-height: 33px;">
                                                <a ng-if="updateHrefFlag" href="javascript:void(0)" ng-click="billDetailsModal.showUpdateModal(resource.value)">{{resource.value.stopName}}</a>
                                                <span ng-if="addFlag && !updateHrefFlag">{{resource.value.stopName}}</span>
                                            </td>
                                            <td style="text-align: center;line-height: 33px;">
                                                {{resource.value.roadName}}
                                            </td>
                                            <td style="text-align: center;line-height: 33px;">
                                                {{resource.value.direction}}
                                            </td>
                                            <td style="text-align: center;line-height: 33px;">
                                                <button type="button" class="btn btn-xs btn btn-danger" ng-click="removeResources(resource.value)">
                                                    <i class="fa fa-trash-o"></i> 删除
                                                </button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                    </div>
                     <div>
                        <button style="float: right;margin: 10px 10px 17px;" class="btn btn-primary" type="button" ng-click="addPublish.lastSure()"><i class="glyphicon glyphicon-floppy-saved" style="background-color:#3E97E4;"></i> 完成</button>
                    </div>
<div ed-modal="billDetailsModal" data-options="width:'900px',static:true,title: '上刊明细',
    icon: 'glyphicon glyphicon-briefcase'" >
    <div ng-include="'www/views/publish_schedule.html'" style="height: 495px;">
  </div>
</div>